#ifndef ALFS_GUI_FRAMEWINDOW_H
#define ALFS_GUI_FRAMEWINDOW_H

// File [alfs/gui/FrameWindow.h].
//
// FrameWindow.
//
// A FrameWindow is a top level window, e.g. a "main window" (if you use just 1).
// The default event loop (WindowEventSource::dispatchEvents) terminates when the
// last FrameWindow is closed.
//
// (c) copyright Alf P. Steinbach 2008.
// Use, modification and distribution are subject to the "New BSD License"
// as listed at <url: http://www.opensource.org/licenses/bsd-license.php>.

#include    "Window.h"              // alfs::Window
#include    "ActionMap.h"           // alfs::ActionMap

namespace alfs{

#   define ThisClass    FrameWindow

    class ThisClass
        : public Window
    {
    private:
        ActionMap   myMainMenuActions;

        ThisClass( ThisClass const& );                  // No such.
        ThisClass& operator=( ThisClass const& );       // No such.

        void onImplPtrVoided();

        void onCommand( UserCommand::Id id );

    protected:
        virtual ~ThisClass();

        class Impl;
        NotifyingPtr<Impl>::Auto    myImpl;

    public:
        typedef alfs::AutoNewPtr<ThisClass>     Ptr;

        ThisClass( wchar_t const title[], VisibilityEnum visibility = visible );

        void* implementationObject() const;

        void setMainMenu( InvocableUserCommandTree::Ptr commandTree );
        void show();
        void close();

        virtual void onPoi() {}
    };
#   undef   ThisClass

}  // alfs

#endif
